#include<iostream>
using namespace std;
int prim()
{
	memset(dis, 0x3f, sizeof(dis));
	dis[1] = 0;
	int res = 0;
	for (int i = 0; i < n; i++) {
		int t = -1;
		for (int j = 1; j <= n; j++) {
			if (!st[j] && (t == -1 || dis[t] > dis[j])) {
				t = j;
			}
		}
		if (i) {
			res += dis[t];
		}
		st[t] = 1;
		for (int j = 1; j <= n; j++) {
			dis[j] = min(dis[j], mp[t][j]);
		}
	}
	return res;
}
int main()
{
	
	return 0;
}